package xerr

// 成功返回
const OK uint32 = 0

/**(前3位代表业务,后三位代表具体功能)**/

// 1. 全局错误码
const SERVER_COMMON_ERROR uint32 = 100001
const REUQEST_PARAM_ERROR uint32 = 100002
const TOKEN_EXPIRE_ERROR uint32 = 100003
const TOKEN_GENERATE_ERROR uint32 = 100004
const DB_ERROR uint32 = 100005
const DB_UPDATE_AFFECTED_ZERO_ERROR uint32 = 100006
const DATA_FORMAT_ERROR = 100007
const TOKEN_PARSE_ERROR uint32 = 100008

// 1. 用户模块
// 1.1 rpc
const USER_NOT_EXIST_ERROR uint32 = 101001
const USER_ALREADY_EXIST_ERROR uint32 = 101002
const USER_OR_PASSWORD_ERROR uint32 = 101003
const USER_ALREADY_FOLLOW_ERROR uint32 = 101004
const USER_NOT_FOLLOW_ERROR uint32 = 101005
const USER_IS_NOT_FRIEND_ERROR uint32 = 101005

// 1.2 api

const REGISTER_ERROR = 102001
const LOGIN_ERROR = 102002
const USER_CANNOT_ACTION_SELF = 102003

// 2. 视频模块
// 2.1 api
const FORM_PRASE_ERROR uint32 = 201001
const UPLOAD_FILE_TYPE_ERROR uint32 = 201002
const UPLOAD_FILE_LIMIT_EXCEEDED uint32 = 201003
const UPLOAD_FILE_ERROR uint32 = 201004
const UPLOAD_FILE_NOT_FOUND_ERROR uint32 = 201004
const COMMENT_NOT_EXIST_ERROR uint32 = 201005

// 2.2 rpc
const VIDEO_NOT_EXIST_ERROR = 202001
const VIDEO_ALREADY_FAVORITE_ERROR = 202002
const VIDEO_NOT_FAVORITE_ERROR = 202003
